home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / BDiamond / BDInterfaces.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-20  |  1.9 KB  |  70 lines  |  [TEXT/CWIE]

  1. #ifndef _BDInterfaces_
  2. #define _BDInterfaces_
  3.  
  4. // this entire file is a BDIAMOND addition
  5.  
  6. ///////////////////////////////////////////////////////////////////////////////
  7. //
  8. // Constants
  9. //
  10.  
  11. const IID kUninitializedInterfaceID = { 0L, 0, 0, (unsigned char)0L };
  12.  
  13. ///////////////////////////////////////////////////////////////////////////////
  14. //
  15. // CMenuItem, used for menu interactions
  16. //
  17.  
  18. const long MAX_MENU_ITEM_TEXT_LENGTH    = 255;
  19.  
  20. class CMenuItem
  21. {
  22. public:
  23.     CMenuItem(void) { itemNumber = 0; itemText[0] = 0; }
  24.     ~CMenuItem(void) {};
  25.     
  26.     short    itemNumber;
  27.     char    itemText[MAX_MENU_ITEM_TEXT_LENGTH+1];
  28. };
  29.  
  30. ///////////////////////////////////////////////////////////////////////////////
  31. //
  32. // IDoMenuEvents interface
  33. //
  34.  
  35. DECLARE_INTERFACE_(IDoMenuEvents, IUnknown)
  36. {
  37.     BEGIN_INTERFACE
  38.     
  39.     // *** IUnknown methods ***
  40.     STDMETHOD (QueryInterface)(THIS_ REFIID RefID, void** Obj) PURE;
  41.     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  42.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  43.  
  44.     // *** IDoMenuEvents methods ***
  45.     STDMETHOD (Popup)(THIS_ IUnknown* Source, PlatformEvent* Event) PURE;
  46.     STDMETHOD (Clear)(THIS_ IUnknown* Source, PlatformEvent* Event) PURE;
  47.     STDMETHOD (RemoveItem)(THIS_ IUnknown* Source, PlatformEvent* Event, const CMenuItem & Item) PURE;
  48.     STDMETHOD (AddItem)(THIS_ IUnknown* Source, PlatformEvent* Event, const CMenuItem & Item) PURE;
  49. };
  50.  
  51. ///////////////////////////////////////////////////////////////////////////////
  52. //
  53. // IDidMenuEvents interface
  54. //
  55.  
  56. DECLARE_INTERFACE_(IDidMenuEvents, IUnknown)
  57. {
  58.     BEGIN_INTERFACE
  59.     
  60.     // *** IUnknown methods ***
  61.     STDMETHOD (QueryInterface)(THIS_ REFIID RefID, void** Obj) PURE;
  62.     STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  63.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  64.     
  65.     // *** IDidMenuEvents methods ***
  66.     STDMETHOD (Click)(THIS_ IUnknown* Source, PlatformEvent* Event, char * SourceName, const CMenuItem & Item) PURE;
  67. };
  68.  
  69. #endif // _BDInterfaces_
  70.